package lab02.text19;

public class Text {
    public static void main(String[] args) {

        String result="HelloWord";
        char tmp;
        //倒序输出
        for(int i=result.length()-1;i>=0;i--){
            tmp=result.charAt(i);

            //大写->小写
            if(tmp>='A'&&tmp<='Z'){
                System.out.print((char)(tmp+32));
            }

            //小写->大写
            else if(tmp>='a'&&tmp<='z'){
                System.out.print((char)(tmp-32));
            }
        }
    }
}